package com.carter.springframework.beans.factory.support;

import com.carter.springframework.beans.factory.config.BeanDefinition;
import com.carter.springframework.beans.exception.BeanException;
import com.carter.springframework.beans.factory.config.CarterBeanDefinition;

public interface BeanDefinitionRegistry {
    /**
     * 获取bean定义
     * @param beanName
     * @return
     * @throws BeanException
     */
    BeanDefinition getBeanDefinition(String beanName) throws BeanException;

    CarterBeanDefinition getCarterBeanDefinition(String beanName) throws BeanException;

    /**
     * 注册bean定义
     * @param beanName
     * @param beanDefinition
     */
    void registerBeanDefinition(String beanName,BeanDefinition beanDefinition);

    void registerBeanDefinition(String beanName,CarterBeanDefinition beanDefinition);

    boolean containsBeanDefinition(String beanName);
}
